import request, { downloadFile } from '@/utils/request'

const api = {
  create:'/emergencyManagement/create',
  update:'/emergencyManagement/update',
  delete:'/emergencyManagement/delete',
  findByPage:'/emergencyManagement/findByPage',
  downLoad:'/emergencyManagement/export',
  importExcel:'/emergencyManagement/import',
  findAllEquipment:'/equipmentMaintainance/findAllEquipment'
}

export default api

// 新建
export function create(parameter) {
  return request({
    url: api.create,
    method: 'post',
    data: parameter
  })
}
// 更新
export function update(parameter) {
  return request({
    url: api.update,
    method: 'post',
    data: parameter
  })
}
// 删除
export function remove(parameter) {
  return request({
    url: api.delete+ '?id=' + parameter,
    method: 'post',
    params: parameter

  })
}
// 查询
export function findByPage(parameter) {
  return request({
    url: api.findByPage,
    method: 'get',
    params: parameter
  })
}
//下载
export function downLoad() {
  return downloadFile({


    url: api.downLoad,
    method: 'get',
  })
}
// 导入
export function importExcel(data, params) {
  return request({
    url: api.importExcel,
    method: 'post',
    data: data,
    params: params
  })
}



